/* Created by Aquariuslt on 5/20/17.*/


FoodAdController.$inject = ['foodAdService','$scope','$location'];
function FoodAdController(foodAdService,$scope,$location) {
   var $ = require('jquery');
    $('#nav').show();
  var vm = $scope.vm = {};
  vm.foodAdlist = [];
  vm.unpassedFoodAdlist = [];
  vm.passedFoodAdlist = [];

  vm.merchant = JSON.parse(sessionStorage.merchant);

  foodAdService.foodAdlist(vm.merchant.icnum,function(err,foodAdlist){
    console.log("所有的菜品推荐");
    vm.foodAdlist = foodAdlist;
  });

  foodAdService.getPassedFoodAdList(vm.merchant.icnum,function(err,foodAdlist){
    console.log("所有的通过菜品推荐");
    vm.passedFoodAdlist = foodAdlist;
  });

  foodAdService.getUnpassedFoodAdList(vm.merchant.icnum,function(err,foodAdlist){
    console.log("所有的未通过菜品推荐");
    vm.unpassedFoodAdlist = foodAdlist;
  });

}

module.exports = FoodAdController;